import Vue from 'vue';
import 'APlayer/dist/APlayer.min.css';
import APlayer from 'APlayer';
import { boot } from 'quasar/wrappers';

declare namespace APlayer {}
export type APlayerType = {
  init: (data: any) => void;
};

declare module 'vue/types/vue' {
  interface Vue {
    $aPlayer: APlayerType;
  }
}

export default boot(({ Vue }) => {
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
  APlayer.init = (options: any) => {
    return new APlayer(options);
  };
  Vue.prototype.$aPlayer = APlayer;
});
